import e from"compute-scroll-into-view";let t=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};function o(o,l){let n=o.isConnected||o.ownerDocument.documentElement.contains(o);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(l))return l.behavior(n?e(o,l):[]);if(!n)return;let r=t(l),c=e(o,r),i="scrollBehavior"in document.body.style;c.forEach((e=>{let{el:t,top:o,left:l}=e;t.scroll&&i?t.scroll({top:o,left:l,behavior:r.behavior}):(t.scrollTop=o,t.scrollLeft=l)}))}export{o as default};
//# sourceMappingURL=index.js.map
